<script lang="ts">
import type { LabelHTMLAttributes } from 'vue'
import type { PolymorphicProps } from '../factory'

export interface ColorPickerLabelBaseProps extends PolymorphicProps {}
export interface ColorPickerLabelProps
  extends ColorPickerLabelBaseProps,
    /**
     * @vue-ignore
     */
    LabelHTMLAttributes {}
</script>

<script setup lang="ts">
import { ark } from '../factory'
import { useColorPickerContext } from './use-color-picker-context'
import { useForwardExpose } from '../../utils/use-forward-expose'

defineProps<ColorPickerLabelProps>()
const colorPicker = useColorPickerContext()

useForwardExpose()
</script>

<template>
  <ark.label v-bind="colorPicker.getLabelProps()" :as-child="asChild">
    <slot />
  </ark.label>
</template>
